| author | |
| committer | |
| log | 38a1222c875a3d767c77d4e98bc2293ebbfc0487 |
| tree | 8305fb1fb21ca149f85c9ea563c14d7d5e65d7d0 |
| parent | 8f9b31af926e0635a82c30d0eb7b2942f78932e5 |
5 files changed, 4 insertions(+), 12 deletions(-)
lib/std/crypto/argon2.zig-2| ... | ... | @@ -897,7 +897,6 @@ test "kdf" { |
| 897 | 897 | } |
| 898 | 898 | |
| 899 | 899 | test "phc format hasher" { |
| 900 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 901 | 900 | const allocator = std.testing.allocator; |
| 902 | 901 | const password = "testpass"; |
| 903 | 902 | |
| ... | ... | @@ -913,7 +912,6 @@ test "phc format hasher" { |
| 913 | 912 | } |
| 914 | 913 | |
| 915 | 914 | test "password hash and password verify" { |
| 916 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 917 | 915 | const allocator = std.testing.allocator; |
| 918 | 916 | const password = "testpass"; |
| 919 | 917 |
lib/std/crypto/bcrypt.zig-1| ... | ... | @@ -802,7 +802,6 @@ test "bcrypt crypt format" { |
| 802 | 802 | } |
| 803 | 803 | |
| 804 | 804 | test "bcrypt phc format" { |
| 805 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 806 | 805 | const hash_options = HashOptions{ |
| 807 | 806 | .params = .{ .rounds_log = 5 }, |
| 808 | 807 | .encoding = .phc, |
lib/std/crypto/phc_encoding.zig+2-3| ... | ... | @@ -41,7 +41,7 @@ pub fn BinValue(comptime max_len: usize) type { |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /// Return the slice containing the actual value. |
| 44 | pub fn constSlice(self: Self) []const u8 { | |
| 44 | pub fn constSlice(self: *const Self) []const u8 { | |
| 45 | 45 | return self.buf[0..self.len]; |
| 46 | 46 | } |
| 47 | 47 | |
| ... | ... | @@ -52,7 +52,7 @@ pub fn BinValue(comptime max_len: usize) type { |
| 52 | 52 | self.len = len; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | fn toB64(self: Self, buf: []u8) ![]const u8 { | |
| 55 | fn toB64(self: *const Self, buf: []u8) ![]const u8 { | |
| 56 | 56 | const value = self.constSlice(); |
| 57 | 57 | const len = B64Encoder.calcSize(value.len); |
| 58 | 58 | if (len > buf.len) return Error.NoSpaceLeft; |
| ... | ... | @@ -260,7 +260,6 @@ fn kvSplit(str: []const u8) !struct { key: []const u8, value: []const u8 } { |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | test "phc format - encoding/decoding" { |
| 263 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 264 | 263 | const Input = struct { |
| 265 | 264 | str: []const u8, |
| 266 | 265 | HashResult: type, |
lib/std/crypto/scrypt.zig+2-3| ... | ... | @@ -248,7 +248,7 @@ const crypt_format = struct { |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | /// Return the slice containing the actual value. |
| 251 | pub fn constSlice(self: Self) []const u8 { | |
| 251 | pub fn constSlice(self: *const Self) []const u8 { | |
| 252 | 252 | return self.buf[0..self.len]; |
| 253 | 253 | } |
| 254 | 254 | |
| ... | ... | @@ -259,7 +259,7 @@ const crypt_format = struct { |
| 259 | 259 | self.len = len; |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | fn toB64(self: Self, buf: []u8) ![]const u8 { | |
| 262 | fn toB64(self: *const Self, buf: []u8) ![]const u8 { | |
| 263 | 263 | const value = self.constSlice(); |
| 264 | 264 | const len = Codec.encodedLen(value.len); |
| 265 | 265 | if (len > buf.len) return EncodingError.NoSpaceLeft; |
| ... | ... | @@ -683,7 +683,6 @@ test "unix-scrypt" { |
| 683 | 683 | } |
| 684 | 684 | |
| 685 | 685 | test "crypt format" { |
| 686 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 687 | 686 | const str = "$7$C6..../....SodiumChloride$kBGj9fHznVYFQMEn/qDCfrDevf9YDtcDdKvEqHJLV8D"; |
| 688 | 687 | const params = try crypt_format.deserialize(crypt_format.HashResult(32), str); |
| 689 | 688 | var buf: [str.len]u8 = undefined; |
src/codegen/c.zig-3| ... | ... | @@ -225,9 +225,6 @@ fn formatIdent( |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | pub fn fmtIdent(ident: []const u8) std.fmt.Formatter(formatIdent) { |
| 228 | if (builtin.zig_backend != .stage1) { | |
| 229 | @panic("TODO"); | |
| 230 | } | |
| 231 | 228 | return .{ .data = ident }; |
| 232 | 229 | } |
| 233 | 230 |