summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCrypto
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibCrypto')
-rw-r--r--Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h2
-rw-r--r--Userland/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h8
-rw-r--r--Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp2
-rw-r--r--Userland/Libraries/LibCrypto/PK/Code/EMSA_PSS.h2
-rw-r--r--Userland/Libraries/LibCrypto/PK/RSA.cpp4
5 files changed, 9 insertions, 9 deletions
diff --git a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h
index b2ff1dd118..753a27c47c 100644
--- a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h
+++ b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h
@@ -64,7 +64,7 @@ public:
return { UnsignedBigInteger::create_invalid(), false };
}
- static SignedBigInteger import_data(const AK::StringView& data) { return import_data((const u8*)data.characters_without_null_termination(), data.length()); }
+ static SignedBigInteger import_data(const StringView& data) { return import_data((const u8*)data.characters_without_null_termination(), data.length()); }
static SignedBigInteger import_data(const u8* ptr, size_t length);
size_t export_data(Bytes, bool remove_leading_zeros = false) const;
diff --git a/Userland/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h b/Userland/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h
index 07d2ca4848..becae66749 100644
--- a/Userland/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h
+++ b/Userland/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h
@@ -42,7 +42,7 @@ class UnsignedBigInteger {
public:
UnsignedBigInteger(u32 x) { m_words.append(x); }
- explicit UnsignedBigInteger(AK::Vector<u32, STARTING_WORD_SIZE>&& words)
+ explicit UnsignedBigInteger(Vector<u32, STARTING_WORD_SIZE>&& words)
: m_words(move(words))
{
}
@@ -53,7 +53,7 @@ public:
static UnsignedBigInteger create_invalid();
- static UnsignedBigInteger import_data(const AK::StringView& data) { return import_data((const u8*)data.characters_without_null_termination(), data.length()); }
+ static UnsignedBigInteger import_data(const StringView& data) { return import_data((const u8*)data.characters_without_null_termination(), data.length()); }
static UnsignedBigInteger import_data(const u8* ptr, size_t length)
{
return UnsignedBigInteger(ptr, length);
@@ -64,7 +64,7 @@ public:
static UnsignedBigInteger from_base10(const String& str);
String to_base10() const;
- const AK::Vector<u32, STARTING_WORD_SIZE>& words() const { return m_words; }
+ const Vector<u32, STARTING_WORD_SIZE>& words() const { return m_words; }
void set_to_0();
void set_to(u32 other);
@@ -116,7 +116,7 @@ private:
static constexpr size_t BITS_IN_WORD = 32;
// Little endian
// m_word[0] + m_word[1] * 256 + m_word[2] * 65536 + ...
- AK::Vector<u32, STARTING_WORD_SIZE> m_words;
+ Vector<u32, STARTING_WORD_SIZE> m_words;
// Used to indicate a negative result, or a result of an invalid operation
bool m_is_invalid { false };
diff --git a/Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp b/Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp
index fd54602ae4..4125916a84 100644
--- a/Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp
+++ b/Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp
@@ -291,7 +291,7 @@ UnsignedBigInteger random_number(const UnsignedBigInteger& min, const UnsignedBi
// Also, if we're about to crash anyway, at least produce a nice error:
VERIFY(size < 8 * MiB);
u8 buf[size];
- AK::fill_with_random(buf, size);
+ fill_with_random(buf, size);
UnsignedBigInteger random { buf, size };
// At this point, `random` is a large number, in the range [0, 256^size).
// To get down to the actual range, we could just compute random % range.
diff --git a/Userland/Libraries/LibCrypto/PK/Code/EMSA_PSS.h b/Userland/Libraries/LibCrypto/PK/Code/EMSA_PSS.h
index 95e6e58008..3812e000f9 100644
--- a/Userland/Libraries/LibCrypto/PK/Code/EMSA_PSS.h
+++ b/Userland/Libraries/LibCrypto/PK/Code/EMSA_PSS.h
@@ -57,7 +57,7 @@ public:
auto em_length = (em_bits + 7) / 8;
u8 salt[SaltLength];
- AK::fill_with_random(salt, SaltLength);
+ fill_with_random(salt, SaltLength);
if (em_length < hash_length + SaltLength + 2) {
dbgln("Ooops...encoding error");
diff --git a/Userland/Libraries/LibCrypto/PK/RSA.cpp b/Userland/Libraries/LibCrypto/PK/RSA.cpp
index b4b90c187b..2a5b7960b4 100644
--- a/Userland/Libraries/LibCrypto/PK/RSA.cpp
+++ b/Userland/Libraries/LibCrypto/PK/RSA.cpp
@@ -358,12 +358,12 @@ void RSA_PKCS1_EME::encrypt(ReadonlyBytes in, Bytes& out)
// FIXME: Without this assertion, GCC refuses to compile due to a memcpy overflow(!?)
VERIFY(ps_length < 16384);
- AK::fill_with_random(ps, ps_length);
+ fill_with_random(ps, ps_length);
// since arc4random can create zeros (shocking!)
// we have to go through and un-zero the zeros
for (size_t i = 0; i < ps_length; ++i)
while (!ps[i])
- AK::fill_with_random(ps + i, 1);
+ fill_with_random(ps + i, 1);
u8 paddings[] { 0x00, 0x02 };