aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/skein/skein_512.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-13 20:53:31 +0000
committerlloyd <[email protected]>2010-09-13 20:53:31 +0000
commit4fe8a34f1869805d9115f39cad53d1fd7f7eb6c4 (patch)
tree2ff6c30d1a7d5f2244b6f1b459a5ea10b6d43fe0 /src/hash/skein/skein_512.cpp
parent36bfef27271eadffefbc6891a9d7fa7eed7b1e10 (diff)
Remove more uses of vector to pointer implicit conversions
Diffstat (limited to 'src/hash/skein/skein_512.cpp')
-rw-r--r--src/hash/skein/skein_512.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/hash/skein/skein_512.cpp b/src/hash/skein/skein_512.cpp
index dabaa5da2..5aa49ab7a 100644
--- a/src/hash/skein/skein_512.cpp
+++ b/src/hash/skein/skein_512.cpp
@@ -27,7 +27,9 @@ enum type_code {
SKEIN_OUTPUT = 63
};
-void ubi_512(u64bit H[9], u64bit T[], const byte msg[], u32bit msg_len)
+void ubi_512(MemoryRegion<u64bit>& H,
+ MemoryRegion<u64bit>& T,
+ const byte msg[], u32bit msg_len)
{
do
{
@@ -122,16 +124,19 @@ void ubi_512(u64bit H[9], u64bit T[], const byte msg[], u32bit msg_len)
} while(msg_len);
}
-void reset_tweak(u64bit T[3], type_code type, bool final)
+void reset_tweak(MemoryRegion<u64bit>& T,
+ type_code type, bool final)
{
T[0] = 0;
T[1] = ((u64bit)type << 56) | ((u64bit)1 << 62) | ((u64bit)final << 63);
}
-void initial_block(u64bit H[9], u64bit T[3], u32bit output_bits,
+void initial_block(MemoryRegion<u64bit>& H,
+ MemoryRegion<u64bit>& T,
+ u32bit output_bits,
const std::string& personalization)
{
- clear_mem(H, 9);
+ zeroise(H);
// ASCII("SHA3") followed by version (0x0001) code
byte config_str[32] = { 0x53, 0x48, 0x41, 0x33, 0x01, 0x00, 0 };