Skip to content

Commit 1d8dc72

Browse files
authored
Deprecate Argon2id (#1945)
1 parent 2eefb9d commit 1d8dc72

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ and this project adheres to
1717
wallet serialization/deserialization which is not needed anymore after
1818
[#1938].
1919
- Bring back main/types fields for bundlephobia support
20+
- @cosmjs/crypto: Deprecate `Argon2id`/`Argon2idOptions`/`isArgon2idOptions`
21+
because it will likely be removed when wallet serialization/deserialization is
22+
removed.
2023

2124
[#1935]: https://github.com/cosmos/cosmjs/pull/1935
2225
[#1938]: https://github.com/cosmos/cosmjs/issues/1938

packages/crypto/src/argon2.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { isNonNullObject } from "@cosmjs/utils";
22
import { argon2id, ArgonOpts } from "@noble/hashes/argon2.js";
33

4+
/**
5+
* @deprecated This is just a thin wrapper around argon2id from @noble/hashes and will likely be removed.
6+
* @see https://github.com/cosmos/cosmjs/issues/1796
7+
*/
48
export interface Argon2idOptions {
59
/** Output length in bytes */
610
readonly outputLength: number;
@@ -20,6 +24,10 @@ export interface Argon2idOptions {
2024
readonly memLimitKib: number;
2125
}
2226

27+
/**
28+
* @deprecated This is just a thin wrapper around argon2id from @noble/hashes and will likely be removed.
29+
* @see https://github.com/cosmos/cosmjs/issues/1796
30+
*/
2331
export function isArgon2idOptions(thing: unknown): thing is Argon2idOptions {
2432
if (!isNonNullObject(thing)) return false;
2533
if (typeof (thing as Argon2idOptions).outputLength !== "number") return false;
@@ -28,6 +36,10 @@ export function isArgon2idOptions(thing: unknown): thing is Argon2idOptions {
2836
return true;
2937
}
3038

39+
/**
40+
* @deprecated This is just a thin wrapper around argon2id from @noble/hashes and will likely be removed.
41+
* @see https://github.com/cosmos/cosmjs/issues/1796
42+
*/
3143
export class Argon2id {
3244
// This is async for historic reasons. If we switch to a Wasm implementation or get argon2 in WebCrypto,
3345
// this is needed again.

0 commit comments

Comments
 (0)