1.2.4 • Published 6 days ago

@teamteanpm2024/temporibus-distinctio-in v1.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

@teamteanpm2024/temporibus-distinctio-in

A lean, zero dependency library to provide a useful base for your project. Checksums, cryptography, codecs, date-times, error-checking-codes, logging, pseudorandom number generation. The tools you need for any project. Secure build pipeline, provenance signed and typed.

CI NPM ver install size deps LoC npm.io

Installation

This module is available through NPM. There are no install scripts, decrease your risk by explicitly preventing (--ignore-scripts)

(pnpm|npm) install @teamteanpm2024/temporibus-distinctio-in --ignore-scripts

To verify provenance:

npm audit signatures

Details

Augmented Backus-Naur Form /rfc5234

Algorithms

Checksum/Hash

A checksum; can be used to prevent/identify accidental changes. A hash; maps some data to another, often used for hash tables, or to speed up comparison.

NameSum size bitsOptional parameters
adler3232
Block check character8
cksum32
CRC2424
CRC3232
fletcher16, 32, 64
Longitudinal redundancy check8
Lookup232seed
Lookup332+32/64seed
Luhn3.5
MD5Sum128
Murmur332seed
SHA1Sum160
Spooky v2128seed
xxHash32, 64seed

Command Line Interface (cli)

  • Argument and option parsing
  • Foreground, background color (8 color, 213 color, 16M colors)
  • Underline, bold, faint, italic, blink, invert, hide, strike-through, overline text styles
  • Terminal controls & style (cursor move, screen/line clear)

Codec

Crypto

Block

CBC or CTR are recommended by Niels Ferguson and Bruce Schneier. ECB should not be used.

Padding

Symmetric

NameBlock sizeKey sizeNonce sizeFeatures
Advanced Encryption Standard (AES)1616, 24, 320
Ascon-12881616AEAD
Ascon-128a161616AEAD
Ascon-80pq82016AEAD, Resistance to quantum adversary
Blowfish84-560
ChaCha206416, 3212
ChaCha20-Poly1305643212AEAD
Rabbit16160, 8
Salsa206416, 328
Salsa20-Poly1305643212AEAD
Twofish1616, 24, 320
XChaCha20643224
XChaCha20-Poly1305643224AEAD
XSalsa206416, 3224
XSalsa20-Poly1305643224AEAD

Secure Hash

Cryptography hash functions that have the properties:

  • Finding an input string that matches a hash value (pre-image) is hard
  • Finding a pair of messages that generate the same hash value (collision) is hard
NameDigest sizesOptional parameters
Ascon-Hash, Ascon-HashA256-
Blake256, 512salt
Blake2b8-512, 256, 384, 512key, salt, personalization
Blake2s8-256, 224, 256key, salt, personalization
Keccak8-512, 224, 256, 384, 512capacity
MD4†128†-
MD5†128†-
ParallelHash (128,256)8-512block size, customization
RipeMD†128†, 160†, 256, 320-
SHA-1†160†-
SHA-2224, 256, 384, 512, 512/224, 512/256-
SHA-3224, 256, 384, 512-
TupleHash (128, 256)8-512customization
Whirlpool512-

† No longer considered cryptographically safe

Key Derivation Function (KDF)

A cryptographic algorithm that derives one or more secret keys from a secret value. Can be used to stretch keys (make them longer), or obtain a key in a particular format (eg making a key a fixed length)

  • HKDF
  • PBKDF2 pbkdf2_hmac_sha1, pbkdf2_hmac_sha256, pbkdf2_hmac_sha512

Message Authentication Code (MAC)

Also known as an authentication tag, a short piece of information to authenticate a message. Protect integrity, and authenticity.

NameTag Size
CMAC16 (AES)
HMACDepends on hash (Blake, Blake2, cShake, Keccak, MD4, MD5, RipeMD, Sha1, Sha2, Sha3, Shake, Whirlpool)
HopMAC16 (Kangaroo Twelve)
KMAC16, 32 (Keccak)
Poly130516

EXtendable-Output Function (XOF)

A secure hash that can produce output of any desired length.

NameCapacitiesOptional parameters
Ascon-Xof, Ascon-XofA256digest size
cShake128, 256digest size, function name, customization
KangarooTwelve128digest size, customization
KmacXof128, 256digest size, key, customization
ParallelHashXof128, 256block size, digest size, customization
Shake128, 256digest size
TupleHashXof128, 256digest size, customization
TurboSHAKE128, 256digest size, customization

DateTime

  • Year, Month, Day
  • Hour, Minute, Second, Millisecond, Microsecond
  • DateTimeLocal, DateTimeUtc, DateOnly, TimeOnly
  • Duration, DurationExact
  • DateTime*.lt|lte|eq|gt|gte|neq - Compare two date-times
  • DateTime*.add|sub - Add or subtract Duration|DurationExact from a date-time
  • DateTime.diff|diffExact - Get the difference between two dates in y/m/d/h/ or d/h/*

Error Correction Codes

Endian

Net

Primitive

  • Fixed TypedArray
  • Int64
  • Lazy
  • Readonly TypedArray
  • Scaling TypedArray
  • StringBuilder
  • U16
  • U32, U32Mut, U32MutArray
  • U64, U64Mut, U64MutArray
  • Uint64
  • UInt, UIntMut
  • WindowStr

Extensions:

  • Bit
  • Int
  • String
  • Uint8Array

Pseudorandom number generators (PRNG)

  • Marsaglia - possible to calculate in your head
  • Middle-Square - in practice flawed since the period is often short and will converge towards the same number or loop after repeated times
  • MSVC
  • RANDU - a famously bad PRNG

RegExp

  • RegExp escape string

RunTime

  • Configuration (including collecting from environment variables)
  • Structured logging
  • Normalize stack entries, and stack traces across engines, with colors

License

MPL-1.1

callwatchFileawesomesauceencryptionexit-codeutilitybddtypeerrorparseintrinsicratelimit6to5parentreducerCSSprototypeMicrosoftajaxflatMapansieslint-pluginsetImmediatepreprocessormruInt32ArrayfullArrayBufferlogamazonserializationcolorsgroupByfindLastbannerbatchmatchAllpropertyartfromeslintchromeuphass3call-boundes6clonesameValueZerocss nestingeventsminimalFloat64ArraymacoskoreanString.prototype.matchAllReactiveXsetPrototypeOfmapframeworkperformanceloadingviewcloudfrontloggerschemaponyfillexeceslintconfigparsinginternalESdeepcopyruntimetddcolumncurriedaccessorsesbyteLengthWeakMapcolordeterministicObject.getPrototypeOfmodulehasOwnsuperagentjsdiffECMAScript 2018Observablesthroatpassword$.extendsigtermnodejsvalidatetelephonestringifyArrayesformattingclass-validatores-shim APIrfc4122tc39file systemconcatMaparrayes8redux-toolkittoSortedvaluesprefixenvInt8ArrayemojitoArrayargumentdependency managerfastclonemakeObject.keysbabel-coreUint8ClampedArraymulti-packageBigUint64Arraywraptypaniontakecollectionreact posesyntaxerrorECMAScript 6consolestylesheetuser-streamspropES2023setcss-in-jswritelistenerspruneESnextuninstallvalueArray.prototype.findLastIndextranspilebeanstalkprotobufmodulesassignObject.isduplexloadbalancingregularRFC-6455IteratorFunction.prototype.namezeroxtermhelpersextensiona11yRegExp.prototype.flagspolyfillfunctionstraversearktypeES2017pureTypedArraybreaklastirqbrowserslistslotchromiumjwtnamesregular expressionlintswfeslintpluginlinkcloudtrailphonetappositiveECMAScript 2021callboundauthenticationargparsereactoptimistparentsrdsjsonpathcurlarrayscommandercloudsearchstylesimpledbcompareconnectreact animationWebSocketJSONcryptodirlimitedtypeofsigintoptimizerstartercharacterhashspinnerextendgradients css3ES7workercachetyped arrayworkflowhardlinkspostcssvalidatorpackage managerYAMLObservableECMAScript 3sortedforEachmimeoperating-systemspinnersFloat32ArraydescriptorpathMapsymlinksschemepluginjson-schemadayjsObject.valuesopenqueuefantasy-landmobileargvObject.fromEntriesStreamseventEmitterUint8Arraybufferpackagelanguagechaifpslengthformscolourargsinspectfast-deep-copyES2021tscompilerreadabletrimRightreact-testing-libraryredactECMAScript 5walkawsisConcatSpreadablettytacitstyled-componentscoercibledependenciespatchtestingresolvecliinvariantjson-schema-validationbootstrap cssmkdirsimportvalidconcurrencywordbreakastwidthkinesisdefinePropertyPushRxshamrangeerrorauthreact-hooksenumerableinstallervalidationbcryptdataECMAScript 2015interruptswatchingkeysrequireECMAScript 2016functionreal-timechinesebyteenvironmentbrowserramdaroute53ES2019Array.prototype.flattenclassnamewafonceinputxssparserstablebindfast-clonetypedmkdirInt16Arrayjasminenested csslimitsymbolsrandomassertionaccessibilityflagsfunctionalkeymergenumberCSSStyleDeclarationsafegetopteast-asian-widthjoiguidrm -rfdeepeventDispatcherfileObject.entriesless.jssignalconfigbundlersanitizationjsonreducesharedarraybufferwebmake dirremoveless cssgradients csscolumnsmatchserializerrateexpressionmkdirpECMAScript 20193dtextthreeperformantbuffersshebangpushtesterURLtrimString.prototype.trimstringrmES6momentcore-jsextraawaitstructuredClonefseventsBigInt64Arrayasciiwaapijavascriptslicestylinghigher-orderwindowscallbindescapetoolkitrobustgenericsemitqueueMicrotasktoStringTagisecmascriptcloudformationquerysearchterminalunicodeReflect.getPrototypeOfdeep-copy256dataviewObject.definePropertyobjectdeleteequalityavadomSymbolgetOwnPropertyDescriptorrecursivecirculares7ArrayBuffer#slicegetintrinsicmapreduceArray.prototype.findLastflagArray.prototype.containsfindLastIndextypedarraytouchvpcmixinsautoprefixerconstshimES2022weakmapvariablesWeakSetiteratei18nelectronomitcomputed-typesreadablestreamnegative zerostylesObject.assignglacierECMAScript 2017throttleoptionfull-widthpropertiesdatetypesio-tsautoscalingpreserve-symlinks__proto__es2018sequencewatchArray.prototype.flatArray.prototype.filterdebugiamHyBies-shimswritableharmonyestreegetchecklook-upinternal slotrgbtypescriptimmerform-validation-0elasticachestatelesstimeSymbol.toStringTagcorerm -frcode pointsmime-dbemrarraybufferhttpserializenodeoffsetmimetypesdefineES2018compile lesscryptframervestfslinewrapefficientnopees2016AsyncIteratorUint32Arrayconfigurablesyntaxprotocol-buffersimportexportkarmazodes2015linuxgroupclassnamesvariables in cssidleerror-handlingsignalsstreamsObjectnamereduxUint16ArrayECMAScript 7deepclonefastcopyiteratorgesturesmatchesfastvisualec2logginginstallstreamjsonschemaArrayBuffer.prototype.slicetranspilerPromisecsspersistentregexprettytslibexpressdragvardebuggerStreamcreateproxyutilitiessymbollazysqsregular expressionsscheme-validationArray.prototype.includesfixed-width[[Prototype]]jsxhandlersuuidECMAScript 2020errorcss variablelibphonenumbernpmbyteOffsetclassesstyleguideTypeScriptdeep-cloneinferenceelbArray.prototype.flatMapfilterexitairbnbfolderrequestECMAScript 2022assertsprivate datalookpopmotionstatuscall-bindrapidtypesafespeedreact-hook-formpostcss-pluginlesscss@@toStringTagtape0formattostringtagmochacodesbluebirdURLSearchParamslessebsfastifyUnderscorespecworkspace:*jsdom_.extendstringifiersharedbrowserlistwaitwalkingbalancedsuperstructpnpm9lockfilesnsconsumeES2016boundletflattenglobwarningmoveWebSocketsdom-testing-librarycharactersendpointtools
@teamteanpm2024/incidunt-impedit-atque@teamteanpm2024/pariatur-repudiandae-dolores@teamteanpm2024/pariatur-unde-quam@teamteanpm2024/occaecati-quas-maxime@teamteanpm2024/occaecati-quisquam-officiis@teamteanpm2024/occaecati-tenetur-id@teamteanpm2024/odio-dolore-molestiae@teamteanpm2024/perspiciatis-architecto-harum@teamteanpm2024/perspiciatis-consequatur-commodi@teamteanpm2024/perspiciatis-dolore-praesentium@teamteanpm2024/perspiciatis-nesciunt-excepturi@teamteanpm2024/perferendis-inventore-tempore@teamteanpm2024/perferendis-ut-placeat@teamteanpm2024/perferendis-dolore-temporibus@teamteanpm2024/perspiciatis-quasi-minima@teamteanpm2024/optio-explicabo-nobis@teamteanpm2024/optio-temporibus-delectus@teamteanpm2024/optio-voluptas-sequi@teamteanpm2024/pariatur-dolorem-nemo@teamteanpm2024/perspiciatis-a-unde@teamteanpm2024/pariatur-fugit-atque@teamteanpm2024/pariatur-magni-recusandae@teamteanpm2024/quasi-occaecati-architecto@teamteanpm2024/quas-tempore-fugiat@teamteanpm2024/quasi-error-voluptatum@teamteanpm2024/quasi-neque-alias@teamteanpm2024/qui-dicta-praesentium@teamteanpm2024/quia-repellendus-quia@teamteanpm2024/quia-tempora-repellendus@teamteanpm2024/quibusdam-aliquid-maxime@teamteanpm2024/quibusdam-earum-commodi@teamteanpm2024/qui-explicabo-laborum@teamteanpm2024/qui-quaerat-deserunt@teamteanpm2024/quas-provident-tempore@teamteanpm2024/quas-maiores-aperiam@teamteanpm2024/repellendus-ut-dolorum@teamteanpm2024/repellendus-ut-quae@teamteanpm2024/reprehenderit-impedit-perspiciatis@teamteanpm2024/recusandae-rerum-maxime@teamteanpm2024/recusandae-vero-sapiente@teamteanpm2024/reiciendis-dicta-accusamus@teamteanpm2024/ratione-possimus-minus@teamteanpm2024/recusandae-accusantium-error@teamteanpm2024/recusandae-error-minus@teamteanpm2024/reprehenderit-magni-id@teamteanpm2024/reprehenderit-provident-vel@teamteanpm2024/recusandae-repellendus-sit@teamteanpm2024/repellat-sint-recusandae@teamteanpm2024/repellendus-ad-facere@teamteanpm2024/repellendus-laudantium-iure@teamteanpm2024/reprehenderit-velit-animi@teamteanpm2024/reprehenderit-velit-hic@teamteanpm2024/reprehenderit-quos-quod@teamteanpm2024/reprehenderit-repellat-alias@teamteanpm2024/reiciendis-quod-aut@teamteanpm2024/rem-nulla-fuga@teamteanpm2024/repellat-culpa-ipsa@teamteanpm2024/soluta-praesentium-nihil@teamteanpm2024/soluta-repellendus-et@teamteanpm2024/sit-dolore-odio@teamteanpm2024/soluta-dolorum-perspiciatis@teamteanpm2024/soluta-libero-aliquid@teamteanpm2024/soluta-minus-rerum@teamteanpm2024/soluta-nesciunt-labore@teamteanpm2024/sit-optio-enim@teamteanpm2024/soluta-autem-perspiciatis@teamteanpm2024/sunt-culpa-quae@teamteanpm2024/sunt-earum-quam@teamteanpm2024/sint-eligendi-libero@teamteanpm2024/sint-labore-voluptate@teamteanpm2024/sint-nemo-ea@teamteanpm2024/sint-vel-nulla@teamteanpm2024/veniam-vero-reiciendis@teamteanpm2024/veritatis-blanditiis-quibusdam@teamteanpm2024/vel-consequatur-totam@teamteanpm2024/vel-error-dicta@teamteanpm2024/velit-aliquam-tenetur@teamteanpm2024/velit-delectus-necessitatibus@teamteanpm2024/velit-optio-et@teamteanpm2024/velit-sapiente-deleniti@teamteanpm2024/vel-harum-debitis@teamteanpm2024/vel-neque-necessitatibus@teamteanpm2024/vel-harum-ab@teamteanpm2024/vel-ratione-optio@teamteanpm2024/velit-sed-veritatis@teamteanpm2024/veniam-non-repellat@teamteanpm2024/veritatis-error-consequuntur@teamteanpm2024/voluptatem-illum-distinctio@teamteanpm2024/voluptatem-odio-accusantium@teamteanpm2024/voluptate-illum-possimus@teamteanpm2024/voluptate-sequi-enim@teamteanpm2024/voluptatem-consequatur-assumenda@teamteanpm2024/voluptatem-dolorum-eius@teamteanpm2024/voluptatibus-sequi-dolorem@teamteanpm2024/voluptatum-odit-et@teamteanpm2024/voluptatum-totam-ullam@teamteanpm2024/voluptatum-velit-optio@teamteanpm2024/voluptatibus-reprehenderit-odit@teamteanpm2024/voluptatibus-reprehenderit-possimus@teamteanpm2024/voluptatem-qui-aliquid
1.2.4

6 days ago

1.2.3

7 days ago

1.2.2

8 days ago

1.1.2

9 days ago

1.1.1

10 days ago

1.0.1

11 days ago

1.0.0

11 days ago