# @smt-lib/md5

> @smt-lib/md5提供了计算md5和base64功能

Latest version **1.0.2** (published 2020-02-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install @smt-lib/md5
pnpm add @smt-lib/md5
yarn add @smt-lib/md5
bun add @smt-lib/md5
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-02-17 |
| First published | 2019-12-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | houyu01 |
| Maintainers | cc_ex, hellnaren, houyu, zhangwentao |

## Links

- npm: https://www.npmjs.com/package/@smt-lib/md5
- npm.io page: https://npm.io/package/@smt-lib/md5

## Recent versions

- 1.0.2 (latest) — 2020-02-17
- 1.0.1 — 2019-12-23
- 1.0.0 — 2019-12-20

## README

---
title: smt-md5
header: develop
nav: extensions
sidebar: smt-md5
---

## smt-md5

**解释：** 在小程序开发中，没有window的概念，导致市面上很多绑定DOM或者BOM的三方库无法使用，@smt-lib/md5是官方提供的md5和base64算法库。

小程序种使用三方npm包方法，见<a href="https://smartprogram.baidu.com/docs/develop/framework/custom-component_trdparty/" target="_self" title="npm使用说明">npm使用说明</a>

```
    npm install @smt-lib/md5

```

**方法** encodeHex


|类型  |必填 | 默认值 |说明|
|---- | ---- | ---- | ----|----|
|String  |  是  | | 要转换的字符串 |



#### 代码示例


```
import {encodeHex} from '@smt-lib/md5';

const string = 'abcdefghigklmn';
const md5edString = encodeHex(string);

```

**方法** encodeBase64


|类型  |必填 | 默认值 |说明|
|---- | ---- | ---- | ----|----|
|String  |  是  | | 要转换的字符串 |


#### 代码示例


```
import {encodeBase64} from '@smt-lib/md5';

const string = 'abcdefghigklmn';
const base64edString = encodeBase64(string);

```

---
_Source: https://npm.io/package/@smt-lib/md5 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
